package cdu.notFound.service.impl;

import cdu.notFound.Dao.MessDao;
import cdu.notFound.Dao.impl.MessDaoImpl;
import cdu.notFound.model.Mess;
import cdu.notFound.model.User;
import cdu.notFound.service.MessService;
import cdu.notFound.utils.IntHolder;

import java.util.List;

public class MessServiceImpl implements MessService {

    MessDao messDao = new MessDaoImpl();

    @Override
    public boolean doCreate(Mess mess) {
        return messDao.doCreate(mess);
    }

    @Override
    public List<Mess> findAllMessByUser(IntHolder num, User user, int limitMin, int perPage) {
        return messDao.findAllMessByUser(num,user,limitMin,perPage);
    }

    @Override
    public boolean removeOneMess(int messId, int userId) {
        return messDao.removeOneMess(messId,userId);
    }
}
